package com.airlines.crewassignment.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.airlines.crewassignment.domain.Crew;
import com.airlines.crewassignment.domain.LinkLine;




/**
 * @author xxxx
 * @date 2018年3月28日 
 * @description
 */


public class CrewPositionAssignmentVo {
	private Date flightDate;
	private Integer crewLinkLineNo;
	private LinkLine linkLine;
	private List<Crew> crewList = new ArrayList<>();
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((crewLinkLineNo == null) ? 0 : crewLinkLineNo.hashCode());
		result = prime * result + ((flightDate == null) ? 0 : flightDate.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CrewPositionAssignmentVo other = (CrewPositionAssignmentVo) obj;
		if (crewLinkLineNo == null) {
			if (other.crewLinkLineNo != null)
				return false;
		} else if (!crewLinkLineNo.equals(other.crewLinkLineNo))
			return false;
		if (flightDate == null) {
			if (other.flightDate != null)
				return false;
		} else if (!flightDate.equals(other.flightDate))
			return false;
		return true;
	}
	
	
}
